3.128 \(\int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx\)

Optimal. Leaf size=89 \[ \frac{\sin ^5(c+d x)}{7 a^2 d}-\frac{10 \sin ^3(c+d x)}{21 a^2 d}+\frac{5 \sin (c+d x)}{7 a^2 d}+\frac{2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )} \]

[Out]

(5*Sin[c + d*x])/(7*a^2*d) - (10*Sin[c + d*x]^3)/(21*a^2*d) + Sin[c + d*x]^5/(7*a^2*d) + (((2*I)/7)*Cos[c + d*
x]^5)/(d*(a^2 + I*a^2*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0585017, antiderivative size = 89, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3500, 2633} \[ \frac{\sin ^5(c+d x)}{7 a^2 d}-\frac{10 \sin ^3(c+d x)}{21 a^2 d}+\frac{5 \sin (c+d x)}{7 a^2 d}+\frac{2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3/(a + I*a*Tan[c + d*x])^2,x]

[Out]

(5*Sin[c + d*x])/(7*a^2*d) - (10*Sin[c + d*x]^3)/(21*a^2*d) + Sin[c + d*x]^5/(7*a^2*d) + (((2*I)/7)*Cos[c + d*
x]^5)/(d*(a^2 + I*a^2*Tan[c + d*x]))

Rule 3500

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(2*d^2
*(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1))/(b*f*(m + 2*n)), x] - Dist[(d^2*(m - 2))/(b^2*(m + 2*n
)), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a
^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (Integers
Q[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin{align*} \int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=\frac{2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac{5 \int \cos ^5(c+d x) \, dx}{7 a^2}\\ &=\frac{2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}-\frac{5 \operatorname{Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{7 a^2 d}\\ &=\frac{5 \sin (c+d x)}{7 a^2 d}-\frac{10 \sin ^3(c+d x)}{21 a^2 d}+\frac{\sin ^5(c+d x)}{7 a^2 d}+\frac{2 i \cos ^5(c+d x)}{7 d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.19092, size = 95, normalized size = 1.07 \[ \frac{i \sec ^2(c+d x) (-70 i \sin (c+d x)+63 i \sin (3 (c+d x))+5 i \sin (5 (c+d x))-140 \cos (c+d x)+42 \cos (3 (c+d x))+2 \cos (5 (c+d x)))}{336 a^2 d (\tan (c+d x)-i)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3/(a + I*a*Tan[c + d*x])^2,x]

[Out]

((I/336)*Sec[c + d*x]^2*(-140*Cos[c + d*x] + 42*Cos[3*(c + d*x)] + 2*Cos[5*(c + d*x)] - (70*I)*Sin[c + d*x] +
(63*I)*Sin[3*(c + d*x)] + (5*I)*Sin[5*(c + d*x)]))/(a^2*d*(-I + Tan[c + d*x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.09, size = 174, normalized size = 2. \begin{align*} 2\,{\frac{1}{{a}^{2}d} \left ({\frac{i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{6}}}-{\frac{5/2\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+{\frac{{\frac{23\,i}{16}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}-2/7\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-7}+2\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-5}-{\frac{55}{24\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{3}}}+{\frac{13}{16\,\tan \left ( 1/2\,dx+c/2 \right ) -16\,i}}-{\frac{i/16}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{2}}}-1/24\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-3}+3/16\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-1} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^2,x)

[Out]

2/d/a^2*(I/(tan(1/2*d*x+1/2*c)-I)^6-5/2*I/(tan(1/2*d*x+1/2*c)-I)^4+23/16*I/(tan(1/2*d*x+1/2*c)-I)^2-2/7/(tan(1
/2*d*x+1/2*c)-I)^7+2/(tan(1/2*d*x+1/2*c)-I)^5-55/24/(tan(1/2*d*x+1/2*c)-I)^3+13/16/(tan(1/2*d*x+1/2*c)-I)-1/16
*I/(tan(1/2*d*x+1/2*c)+I)^2-1/24/(tan(1/2*d*x+1/2*c)+I)^3+3/16/(tan(1/2*d*x+1/2*c)+I))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.32369, size = 244, normalized size = 2.74 \begin{align*} \frac{{\left (-7 i \, e^{\left (10 i \, d x + 10 i \, c\right )} - 105 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 210 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 70 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 21 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{672 \, a^{2} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^2,x, algorithm="fricas")

[Out]

1/672*(-7*I*e^(10*I*d*x + 10*I*c) - 105*I*e^(8*I*d*x + 8*I*c) + 210*I*e^(6*I*d*x + 6*I*c) + 70*I*e^(4*I*d*x +
4*I*c) + 21*I*e^(2*I*d*x + 2*I*c) + 3*I)*e^(-7*I*d*x - 7*I*c)/(a^2*d)

________________________________________________________________________________________

Sympy [A]  time = 1.22719, size = 233, normalized size = 2.62 \begin{align*} \begin{cases} \frac{\left (- 176160768 i a^{10} d^{5} e^{19 i c} e^{3 i d x} - 2642411520 i a^{10} d^{5} e^{17 i c} e^{i d x} + 5284823040 i a^{10} d^{5} e^{15 i c} e^{- i d x} + 1761607680 i a^{10} d^{5} e^{13 i c} e^{- 3 i d x} + 528482304 i a^{10} d^{5} e^{11 i c} e^{- 5 i d x} + 75497472 i a^{10} d^{5} e^{9 i c} e^{- 7 i d x}\right ) e^{- 16 i c}}{16911433728 a^{12} d^{6}} & \text{for}\: 16911433728 a^{12} d^{6} e^{16 i c} \neq 0 \\\frac{x \left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 7 i c}}{32 a^{2}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3/(a+I*a*tan(d*x+c))**2,x)

[Out]

Piecewise(((-176160768*I*a**10*d**5*exp(19*I*c)*exp(3*I*d*x) - 2642411520*I*a**10*d**5*exp(17*I*c)*exp(I*d*x)
+ 5284823040*I*a**10*d**5*exp(15*I*c)*exp(-I*d*x) + 1761607680*I*a**10*d**5*exp(13*I*c)*exp(-3*I*d*x) + 528482
304*I*a**10*d**5*exp(11*I*c)*exp(-5*I*d*x) + 75497472*I*a**10*d**5*exp(9*I*c)*exp(-7*I*d*x))*exp(-16*I*c)/(169
11433728*a**12*d**6), Ne(16911433728*a**12*d**6*exp(16*I*c), 0)), (x*(exp(10*I*c) + 5*exp(8*I*c) + 10*exp(6*I*
c) + 10*exp(4*I*c) + 5*exp(2*I*c) + 1)*exp(-7*I*c)/(32*a**2), True))

________________________________________________________________________________________

Giac [A]  time = 1.1495, size = 196, normalized size = 2.2 \begin{align*} \frac{\frac{7 \,{\left (9 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 15 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 8\right )}}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}^{3}} + \frac{273 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} - 1155 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 2450 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 2870 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 2037 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 791 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 152}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{7}}}{168 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^2,x, algorithm="giac")

[Out]

1/168*(7*(9*tan(1/2*d*x + 1/2*c)^2 + 15*I*tan(1/2*d*x + 1/2*c) - 8)/(a^2*(tan(1/2*d*x + 1/2*c) + I)^3) + (273*
tan(1/2*d*x + 1/2*c)^6 - 1155*I*tan(1/2*d*x + 1/2*c)^5 - 2450*tan(1/2*d*x + 1/2*c)^4 + 2870*I*tan(1/2*d*x + 1/
2*c)^3 + 2037*tan(1/2*d*x + 1/2*c)^2 - 791*I*tan(1/2*d*x + 1/2*c) - 152)/(a^2*(tan(1/2*d*x + 1/2*c) - I)^7))/d